﻿using Myotragus.Data.Criteria;
using Myotragus.Data.Domain;

namespace Myotragus.Data.Repositories
{
	public interface ILocalizableReadRepository<TEntity> :
		ILocalizableRepository<TEntity>
		where TEntity : IEntity
	{
		IPagedQuery<TEntity> FindAll(int lcId);

		int CountAll(int lcId);

		IPagedQuery<TEntity> FindMatching(int lcId, object pattern);

		int CountMatching(int lcId, object pattern);

		IPagedQuery<TEntity> FindLike(int lcId, object pattern);

		int CountLike(int lcId, object pattern);
	}

	public interface ILocalizableReadRepository<TEntity, TId> :
		ILocalizableReadRepository<TEntity>
		where TEntity : IEntity
	{
		bool Exists(TId id);

		TEntity FindById(int lcId, TId id);
	}
}